<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>

  <body>
    <div id="app">
      <!-- 
          v-for="(item, index) in 要遍历的数据"
       -->
      <ul>
        <li v-for="person in persons" :key="person.id">
          {{person.name}} 
        </li>
      </ul>
    </div>
    <script src="./js/vue.js"></script>
    <script>
      const vm = new Vue({
        data: {
          persons: [
            { id: 1, name: "小a" },
            { id: 2, name: "小小a" },
            { id: 3, name: "小小小a" },
          ],
        },
      });
      vm.$mount("#app");
    </script>
  </body>
</html>
